package com.haixiaoke.flat.contract.controller;

import com.haixiaoke.auth.AuthCheck;
import com.haixiaoke.saas.common.annotation.RepeatSubmit;
import com.haixiaoke.saas.common.annotation.TenantScope;
import com.haixiaoke.saas.common.core.domain.AjaxResult;
import com.haixiaoke.saas.common.core.page.TableDataInfo;
import com.haixiaoke.saas.common.tenant.TenantContext;
import com.haixiaoke.saas.common.utils.poi.ExcelUtil;
import com.haixiaoke.saas.contract.domain.Proprietor;
import com.haixiaoke.saas.contract.service.IProprietorService;
import com.haixiaoke.saas.system.BaseController;
import com.haixiaoke.token.FrontTokenComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;

/**
 * 业主信息Controller
 *
 * @author xiaolong
 * @date 2024-06-06
 */
@RestController
@RequestMapping("/front/flat/contract/proprietor")
public class FlatProprietorController extends BaseController {
    @Autowired
    private IProprietorService proprietorService;
    @Autowired
    private FrontTokenComponent frontTokenComponent;

    /**
     * 获取业主信息
     */
    @GetMapping
    @AuthCheck
    public AjaxResult getInfo() {
        return success(proprietorService.selectProprietorByUserId(frontTokenComponent.getUserId()));
    }

}
